$(document).ready(function() {
    var mySwiper = new Swiper('#swiper1 .swiper-container', {
        // direction: 'vertical', // 垂直切换选项
        observer:true,//修改swiper自己或子元素时，自动初始化swiper
        observeParents:true,//修改swiper的父元素时，自动初始化swiper
        loop: true, // 循环模式选项
        autoHeight: true, //高度随内容变化
        autoplay: {
            delay: 3000,
            stopOnLastSlide: false,
            disableOnInteraction: true,
        },
        // 如果需要分页器
        pagination: {
            el: '#swiper1 .swiper-pagination',
        },
        // 如果需要前进后退按钮
        navigation: {
            nextEl: '#swiper1 .swiper-button-next',
            prevEl: '#swiper1 .swiper-button-prev',
        }
        // 如果需要滚动条

    });
    var mySwiper2 = new Swiper('.swiper2 .swiper-container', {
        // direction: 'vertical', // 垂直切换选项
        observer:true,//修改swiper自己或子元素时，自动初始化swiper
        observeParents:true,//修改swiper的父元素时，自动初始化swiper
       loop: true, // 循环模式选项
       slidesPerView: 'auto',
       loopedSlides: 4,
       autoplay: {
           delay: 3000,
           stopOnLastSlide: false,
           disableOnInteraction: true,
       },
        autoHeight: true, //高度随内容变化
        breakpoints: { 
            //当宽度小于等于320
           
           //当宽度小于等于480
            768: { 
              slidesPerView: 1,
            },
            //当宽度小于等于640
            992: {
              slidesPerView: 2,
            },
            1200: {
              slidesPerView: 3,
            }
          },
        // 如果需要分页器
        pagination: {
            el: '.swiper2 .swiper-pagination',
        },
        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper2 .swiper-button-next',
            prevEl: '.swiper2 .swiper-button-prev',
        }
        // 如果需要滚动条

    });
   

    /**/
})